This page last changed on Jun 02, 2006 by stephen fenech.

Agents are services that are associated or used by Mule but not a Mule managed component. For example Mule's Jmx support is implemented and configued using agents. The useful thing about agents is they have the same lifecycle as the Mule instance they are registered with, so you can initialise and destroy resources when the Mule instance starts or is disposed.

To write your own agent you need to implement org.mule.umo.UMOAgent and register your agent with the UMOManager. In the Mule xml configuration use the 'agents' element to register an agent -

<agents>
    <agent name="My Agent" className="org.foo.MyAgent"/>
</agents>

or programmatically -

UMOAgent agent = new MyAgent();
MuleManager.getInstance().registerAgent(agent);
Document generated by Confluence on Nov 27, 2006 10:27